<template>
	<view class="resume">
		<view class="content">

			<view>
				<view class="common person_info" v-if="resume.name">
					<u-row gutter="0">
						<u-col span="3">
							<u-avatar :size="120" :src="avatar" mode="circle"></u-avatar>
						</u-col>
						<u-col span="9">
							<view class="info">
								<text class="title" :style="{padding:'30rpx 0 0 0'}">{{resume.name}}</text>
								<view class="gender">
									<text :style="{paddingLeft:'0rpx'}" v-if="resume.gender">{{resume.gender}}</text>
									<text v-if="resume.age">{{resume.age}}岁</text>
									<text v-if="resume.nation">{{resume.nation}}</text>
									<text v-if="resume.is_married">{{resume.is_married}}</text>
								</view>
							</view>
						</u-col>
					</u-row>
					<view class="icon_text" v-if="resume.id_card_no">
						<view>
							<u-image width="40rpx" height="40rpx" src="/static/uview/my/resume_idcard.png" />
						</view>
						<text>{{resume.id_card_no}}</text>
					</view>
					<u-row gutter="0">
						<u-col span="6" v-if="resume.height">
							<view class="icon_text">
								<view>
									<u-image width="40rpx" height="40rpx" src="/static/uview/my/resume_height.png" />
								</view>
								<text>身高：{{resume.height}}cm</text>
							</view>
						</u-col>
						<u-col span="6" v-if="resume.weight">
							<view class="icon_text">
								<view>
									<u-image width="40rpx" height="40rpx" src="/static/uview/my/resume_weight.png" />
								</view>
								<text>体重：{{resume.weight}}kg</text>
							</view>
						</u-col>
					</u-row>
					<view class="adress" v-if="resume.current_address"><text>现居住地：</text>{{resume.current_address}}</view>
					<view class="adress" :style="{margin:'0'}" v-if="resume.hukou_place"><text>户口所在地：</text>{{resume.hukou_place}}</view>
					<view class="edit" @click="handelClick('base')">
						<u-icon size="40" name="/static/uview/my/resume_edit.png" :style="{position:'relative', top:'10rpx'}"></u-icon>
						<text :style="{margin:'0 0 0 10rpx'}">编辑</text>
					</view>
				</view>

				<view class="common no_person_info" v-else>
					<u-row>
						<u-col span="3">
							<u-avatar :size="120" :src="avatar" mode="circle"></u-avatar>
						</u-col>
						<u-col span="9">
							<view class="info">
								<text class="title" :style="{padding:'30rpx 0 0 0'}">编号202129</text>
								<view>暂未填写基本信息</view>
							</view>
						</u-col>
					</u-row>
					<view class="edit" @click="handelClick('base')">
						<u-icon size="40" name="/static/uview/my/resume_edit.png" :style="{position:'relative', top:'10rpx'}"></u-icon>
						<text :style="{margin:'0 0 0 10rpx'}">编辑</text>
					</view>
				</view>
			</view>

			<view>
				<view class="common contact_information" v-if="resume.mobile">
					<view class="info">
						<text class="title">联系信息</text>
					</view>
					<view class="icon_text">
						<view>
							<u-image width="40rpx" height="40rpx" src="/static/uview/my/resume_mobile.png" />
						</view>
						<text>18639677270</text>
					</view>
					<view class="icon_text">
						<view>
							<u-image width="40rpx" height="40rpx" src="/static/uview/my/resume_qq.png" />
						</view>
						<text>760679216</text>
					</view>
					<view class="icon_text" :style="{margin:'0'}">
						<view>
							<u-image width="40rpx" height="40rpx" src="/static/uview/my/resume_weixin.png" />
						</view>
						<text>929vdhsabk.ac</text>
					</view>
					<view class="edit">
						<u-icon size="40" name="/static/uview/my/resume_edit.png" :style="{position:'relative', top:'10rpx'}"></u-icon>
						<text :style="{margin:'0 0 0 10rpx'}">编辑</text>
					</view>
				</view>

				<view class="common no_contact_information" v-else>
					<view class="info">
						<text class="title">联系信息</text>
						<text>暂未填写基本信息</text>
					</view>
					<view class="edit">
						<u-icon size="40" name="/static/uview/my/resume_edit.png" :style="{position:'relative', top:'10rpx'}"></u-icon>
						<text :style="{margin:'0 0 0 10rpx'}">编辑</text>
					</view>
				</view>
			</view>

			<!-- <view class="common no_job_intention">
				<view class="info">
					<text class="title">求职意向</text>
					<text>暂未填写求职意向</text>
				</view>
				<view class="edit">
					<u-icon size="40" name="/static/uview/my/resume_edit.png" :style="{position:'relative', top:'10rpx'}"></u-icon>
					<text :style="{margin:'0 0 0 10rpx'}">编辑</text>
				</view>
			</view> -->

			<view class="common job_intention">
				<view class="info">
					<text class="title">求职意向</text>
				</view>
				<view class="intention">
					<view>
						<text class="left">产品经理</text>
						<text>12000-15000</text>
					</view>
					<view class="int_address">北京</view>
				</view>
				<view class="edit">
					<u-icon size="40" name="/static/uview/my/resume_edit.png" :style="{position:'relative', top:'10rpx'}"></u-icon>
					<text :style="{margin:'0 0 0 10rpx'}">编辑</text>
				</view>
			</view>

			<!-- <view class="common no_work_exps">
				<view class="info">
					<text class="title">工作经历</text>
					<text>暂未填写工作经历</text>
				</view>
				<view class="edit">
					<u-icon size="40" name="/static/uview/my/resume_add.png" :style="{position:'relative', top:'10rpx'}"></u-icon>
					<text :style="{margin:'0 0 0 10rpx'}">添加</text>
				</view>
			</view> -->

			<view class="common work_exps">
				<view class="info">
					<text class="title">工作经历</text>
				</view>
				<view class="work_item">
					<view class="company">北京小爱</view>
					<view class="job_time">
						<text class="status">在职职位</text>
						<text>2020.1-至今</text>
					</view>
					<view class="work_content">特必与认交真只变转又老七计发百类地县内百除活较情因持期便证将求级族法上发状习式确过派直外只量层证。</view>
					<view class="edit">
						<u-icon size="40" name="/static/uview/my/resume_edit.png" :style="{position:'relative', top:'10rpx'}"></u-icon>
						<text :style="{margin:'0 0 0 10rpx'}">编辑</text>
					</view>
				</view>
				<view class="edit">
					<u-icon size="40" name="/static/uview/my/resume_add.png" :style="{position:'relative', top:'10rpx'}"></u-icon>
					<text :style="{margin:'0 0 0 10rpx'}">添加</text>
				</view>
			</view>

			<!-- <view class="common no_education">
				<view class="info">
					<text class="title">教育背景</text>
					<text>暂未填写教育经历</text>
				</view>
				<view class="edit">
					<u-icon size="40" name="/static/uview/my/resume_add.png" :style="{position:'relative', top:'10rpx'}"></u-icon>
					<text :style="{margin:'0 0 0 10rpx'}">添加</text>
				</view>
			</view> -->

			<view class="common education">
				<view class="info">
					<text class="title">教育背景</text>
				</view>
				<view class="education_item">
					<view class="university">北京大学名称</view>
					<view class="education_time">
						<text class="major">所学专业</text>
						<text>2011.9-2015.7</text>
					</view>
					<view class="education_content">特必与认交真只变转又老七计发百类地县内百除活较情因持期便证将求级族法上发状习式确过派直外只量层证。。</view>
					<view class="edit">
						<u-icon size="40" name="/static/uview/my/resume_edit.png" :style="{position:'relative', top:'10rpx'}"></u-icon>
						<text :style="{margin:'0 0 0 10rpx'}">编辑</text>
					</view>
				</view>
				<view class="edit">
					<u-icon size="40" name="/static/uview/my/resume_add.png" :style="{position:'relative', top:'10rpx'}"></u-icon>
					<text :style="{margin:'0 0 0 10rpx'}">添加</text>
				</view>
			</view>

			<!-- <view class="common no_hobby">
				<view class="info">
					<text class="title">兴趣爱好</text>
					<text>暂未填写兴趣爱好</text>
				</view>
				<view class="edit">
					<u-icon size="40" name="/static/uview/my/resume_edit.png" :style="{position:'relative', top:'10rpx'}"></u-icon>
					<text :style="{margin:'0 0 0 10rpx'}">编辑</text>
				</view>
			</view> -->

			<view class="common hobby">
				<view class="info">
					<text class="title">兴趣爱好</text>
				</view>
				<view class="hobby_content">
					特必与认交真只变转又老七计发百类地县内百除活较情因持期便证将求级族法上发状习式确过派直外只量层证。特必与认交真只变转又老七计发百类地县内百除活较情因持期便证将求级族法上发状习式确过派直外只量层证特必与认交真只变转又老七计发百类地县内百除活较情因。
				</view>
				<view class="edit">
					<u-icon size="40" name="/static/uview/my/resume_edit.png" :style="{position:'relative', top:'10rpx'}"></u-icon>
					<text :style="{margin:'0 0 0 10rpx'}">编辑</text>
				</view>
			</view>

		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				avatar: `/static/uview/my/avatar.png`,
				resume: {

				}

			}
		},

		onLoad() {
			this.$u.api.getReruitDetails().then(res => {
				this.resume = res;
			})
		},

		onShow() {

		},

		// 必须要在onReady生命周期，因为onLoad生命周期组件可能尚未创建完毕
		onReady() {

		},

		methods: {

			handelClick(type) {
				let url = '';
				switch (type) {

					case 'base':
						this.show = false;
						url = 'pages/my_sub/resumeBaseInfo/resumeBaseInfo'
						break;

					case 'resume':
						url = 'pages/my_sub/resume/resume'
						break;

					case 'adjunct':
						url = 'pages/my_sub/adjunct/adjunct'
						break;

					case 'accept':
						url = 'pages/my_sub/acceptJob/acceptJob'
						break;


				}

				this.$u.route({
					url: url,
				})
			},

		}
	}
</script>

<style lang="scss" scoped>
	.resume {
		padding: 0 0 80rpx 0;
		background: #F9F9F9;

		.content {
			padding: 10rpx 40rpx 0 40rpx;
			background: #ffffff;

			.common {
				position: relative;
				border-bottom: 2rpx solid #eeeeee;
				padding: 50rpx 0;

				.info {
					text {
						font-size: 32rpx;
						line-height: 40rpx;
						color: #999999;
					}

					.title {
						font-size: 36rpx;
						line-height: 24rpx;
						color: #333333;
						display: block;
						margin: 0 0 40rpx 0;
					}
				}

				.icon_text {
					margin: 0 0 30rpx 0;

					view {
						display: inline-block;
						width: 40rpx;
						margin: 0 24rpx 0 0;
					}

					text {
						font-size: 32rpx;
						line-height: 40rpx;
						color: #666666;
						vertical-align: super;
						position: relative;
						top: 5rpx;
					}
				}

				.edit {
					position: absolute;
					top: 30rpx;
					right: 0rpx;

					text {
						vertical-align: top;
						font-size: 28rpx;
						line-height: 44rpx;
						color: #54B4F5;
					}
				}
			}

			.person_info,
			.no_person_info {
				.info {
					margin: 0 0 50rpx 0;

					.title {
						font-size: 44rpx;
						line-height: 60rpx;
						margin: 0 0 16rpx 0;
					}

					.gender {
						text {
							font-size: 28rpx;
							margin: 6rpx 0;
							line-height: 28rpx;
							display: inline-block;
							padding: 0 24rpx;
							border-right: 2rpx solid #EEEEEE;
						}
					}
					
						
					.gender text:last-child {
						border-right: none;
					}
				}

				.adress {
					font-size: 32rpx;
					line-height: 40rpx;
					color: #666666;
					margin: 0 0 40rpx 0;

					text {
						font-size: 28rpx;
						color: #999999;
					}
				}

				.edit {
					top: 60rpx;
				}
			}

			.contact_information,
			.no_contact_information {}

			.job_intention,
			.no_job_intention {
				.intention {
					view {
						text {
							font-size: 32rpx;
							line-height: 44rpx;
							color: #000000;
						}

						.left {
							display: inline-block;
							margin: 0 20rpx 0 0;
						}
					}

					.int_address {
						margin: 16rpx 0 0 0;
						font-size: 28rpx;
						line-height: 40rpx;
						color: #999999;
					}
				}
			}

			.work_exps,
			.no_work_exps {
				.work_item {
					position: relative;

					.company {
						font-size: 32rpx;
						line-height: 44rpx;
						color: #333333;
					}

					.job_time {
						margin: 26rpx 0 0 0;

						text {
							font-size: 28rpx;
							line-height: 40rpx;
							color: #666666;
						}

						.status {
							display: inline-block;
							border: 2rpx solid #EEEEEE;
							padding: 0 12rpx;
							font-size: 24rpx;
							line-height: 36rpx;
							color: #999999;
							margin: 0 12rpx 0 0;
						}
					}

					.work_content {
						font-size: 28rpx;
						line-height: 40rpx;
						color: #666666;
						margin: 26rpx 0 0 0;
					}

					.edit {
						top: -7rpx;
					}
				}
			}

			.education,
			.no_education {
				.education_item {
					position: relative;

					.university {
						font-size: 32rpx;
						line-height: 44rpx;
						color: #333333;
					}

					.education_time {
						margin: 26rpx 0 0 0;

						text {
							font-size: 28rpx;
							line-height: 40rpx;
							color: #666666;
						}

						.major {
							display: inline-block;
							border: 2rpx solid #EEEEEE;
							padding: 0 12rpx;
							font-size: 24rpx;
							line-height: 36rpx;
							color: #999999;
							margin: 0 12rpx 0 0;
						}
					}

					.education_content {
						font-size: 28rpx;
						line-height: 40rpx;
						color: #666666;
						margin: 26rpx 0 0 0;
					}

					.edit {
						top: -7rpx;
					}
				}
			}

			.hobby,
			.no_hobby {
				.hobby_content {
					font-size: 28rpx;
					line-height: 40rpx;
					color: #666666;
				}
			}
		}
	}
</style>
